package com.designpatterns.strategypattern;

import com.designpatterns.strategypattern.behaviour.behaviourImpl.FlyNoWay;
import com.designpatterns.strategypattern.behaviour.behaviourInterface.FlyBehaviour;
import com.designpatterns.strategypattern.theEntity.Duck;
import com.designpatterns.strategypattern.theEntity.MiniDuck;

public class TestStrategyPattern {
    public static void main(String[] args) {
        Duck duck = new MiniDuck();
        duck.display();
        duck.fly();
        duck.quack();
        FlyBehaviour flyBehaviour = new FlyNoWay();
        duck.setFlyBehaviour(flyBehaviour);
        duck.fly();
    }
}
